def str_reverse(s):#接受传入字符串，将字符串反转返回
    result = s[::-1]
    return result

if __name__ == '__main__':
    print(str_reverse("AAAAKKKKK"))


def substr(s, x, y):#按照下标x和y，对字符串进行切片
    return s[x:y:1]

